import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class SearchPlaceholderBar extends StatelessWidget{
  final VoidCallback onTap;
  final String placeholder;

  const SearchPlaceholderBar({super.key, required this.onTap, required this.placeholder});

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      behavior: HitTestBehavior.translucent,
      child: Container(
        height: 36.h,
        padding:  EdgeInsets.symmetric(horizontal: 12.w),
        decoration: BoxDecoration(
          color: const Color(0xFFF0F0F0),
          borderRadius: BorderRadius.circular(18)
        ),
        child: Row(children: [
          const Icon(
            CupertinoIcons.search,
            size: 18,
            color: Colors.grey,
          ),
          SizedBox(width: 6.w),
          Text(
            placeholder,
            style: const TextStyle(
              color: Colors.grey,
              fontSize: 15
            ),
          )
        ],),
      ),
    );
  }
}